<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<table border="1">
    <tr>
        <th></th>
        <th>档号</th>
        <th>题名</th>
        <th>所属部门</th>
        <th>类型</th>
        <th>保管期限</th>
        <th>状态</th>
        <th>责任人</th>
        <th>位置</th>
        <th>入库时间</th>
        <th>入库方式</th>
        <th>操作人</th>
        <th>操作</th>
    </tr>
    {% for each in data %}
    <tr>
        <td></td>
        <td>{{ each.serial }}</td>
        <td>{{ each.title }}</td>
        <!-- TODO 部门 -->
        <th>todo</th>
        <td>{{ each.storage_type }}</td>
        <td>{{ each.storage_deadline }}</td>
        <td>{{ each.file_status }}</td>
        <!-- TODO 责任人 -->
        <td>{{ each.owner }}</td>
        <td>{{ each.cabinet.storage_locations }}</td>
        <!-- TODO 入库时间需要范式化 -->
        <td>{{ each.storage_time }}</td>
        <td>{{ each.storage_method }}</td>
        <td>{{ each.operator }}</td>
        <!-- TODO 根据借阅记录判断是否 借出 -->
        <td>
            {% if each.borrowing_record %}
            <a href="#">借阅</a>
            {% else %}
            <a href="#">已借出</a>
            {% endif %}
        </td>
    </tr>
    {{ each.fields }}
    {% endfor %}
</table>

</body>
</html>